__machine_halt(NULL);
}
+ void dump_pageframe_info(struct domain *d)
+ {
+ struct pfn_info *page;
+ struct list_head *ent;
+
+ if ( d->tot_pages < 10 )
+ {
+ list_for_each ( ent, &d->page_list )
+ {
+ page = list_entry(ent, struct pfn_info, list);
+ printk("Page %08x: caf=%08x, taf=%08x\n",
+ page_to_phys(page), page->count_info,
+ page->u.inuse.type_info);
+ }
+ }
+
+ page = virt_to_page(d->shared_info);
+ printk("Shared_info@%08x: caf=%08x, taf=%08x\n",
+ page_to_phys(page), page->count_info,
+ page->u.inuse.type_info);
+ }
+
+ xmem_cache_t *domain_struct_cachep;
+ void __init domain_startofday(void)
+ {
+ domain_struct_cachep = xmem_cache_create(
+ "domain_cache", sizeof(struct domain),
+ 0, SLAB_HWCACHE_ALIGN, NULL, NULL);
+ if ( domain_struct_cachep == NULL )
+ panic("No slab cache for domain structs.");
+ }
+
+ struct domain *arch_alloc_domain_struct(void)
+ {
+ return xmem_cache_alloc(domain_struct_cachep);
+ }
+
+ void arch_free_domain_struct(struct domain *d)
+ {
+ xmem_cache_free(domain_struct_cachep, d);
+ }
+
void free_perdomain_pt(struct domain *d)
{
- free_xenheap_page((unsigned long)d->mm.perdomain_pt);
+ free_xenheap_page((unsigned long)d->mm_perdomain_pt);
}
-static void continue_idle_task(struct domain *d)
+static void continue_idle_task(struct exec_domain *ed)
{
reset_stack_and_jump(idle_loop);
}
void do_task_queues(unsigned char key)
{
struct domain *d;
+ struct exec_domain *ed;
s_time_t now = NOW();
- struct list_head *ent;
- struct pfn_info *page;
printk("'%c' pressed -> dumping task queues (now=0x%X:%08X)\n", key,
(u32)(now>>32), (u32)now);
for_each_domain ( d )
{
- printk("Xen: DOM %u, CPU %d [has=%c] flags=%lx refcnt=%d nr_pages=%d "
- "xenheap_pages=%d\n",
- d->id, d->processor,
- test_bit(DF_RUNNING, &d->flags) ? 'T':'F', d->flags,
+ printk("Xen: DOM %u, flags=%lx refcnt=%d nr_pages=%d "
+ "xenheap_pages=%d\n", d->id, d->d_flags,
atomic_read(&d->refcnt), d->tot_pages, d->xenheap_pages);
- if ( d->tot_pages < 10 )
- {
- list_for_each ( ent, &d->page_list )
- {
- page = list_entry(ent, struct pfn_info, list);
- printk("Page %08x: caf=%08x, taf=%08x\n",
- page_to_phys(page), page->count_info,
- page->u.inuse.type_info);
- }
- }
-
- page = virt_to_page(d->shared_info);
- printk("Shared_info@%08x: caf=%08x, taf=%08x\n",
- page_to_phys(page), page->count_info,
- page->u.inuse.type_info);
+ dump_pageframe_info(d);
- printk("Guest: upcall_pend = %02x, upcall_mask = %02x\n",
- d->shared_info->vcpu_data[0].evtchn_upcall_pending,
- d->shared_info->vcpu_data[0].evtchn_upcall_mask);
- printk("Notifying guest...\n");
- send_guest_virq(d, VIRQ_DEBUG);
+ for_each_exec_domain ( d, ed ) {
+ printk("Guest: %p CPU %d [has=%c] flags=%lx "
+ "upcall_pend = %02x, upcall_mask = %02x\n", ed,
+ ed->processor,
+ test_bit(EDF_RUNNING, &ed->ed_flags) ? 'T':'F',
+ ed->ed_flags,
+ ed->vcpu_info->evtchn_upcall_pending,
+ ed->vcpu_info->evtchn_upcall_mask);
+ printk("Notifying guest... %d/%d\n", d->id, ed->eid);
+ printk("port %d/%d stat %d %d %d\n",
+ VIRQ_DEBUG, ed->virq_to_evtchn[VIRQ_DEBUG],
+ test_bit(ed->virq_to_evtchn[VIRQ_DEBUG], &d->shared_info->evtchn_pending[0]),
+ test_bit(ed->virq_to_evtchn[VIRQ_DEBUG], &d->shared_info->evtchn_mask[0]),
+ test_bit(ed->virq_to_evtchn[VIRQ_DEBUG]>>5, &ed->vcpu_info->evtchn_pending_sel));
+ send_guest_virq(ed, VIRQ_DEBUG);
+ }
}
read_unlock(&domlist_lock);